import React, { Component } from 'react'

class Index extends Component {
  render() {
    // 接受动态路由参数  对象
    console.log('动态路由参数', this.props.match.params)
    // search字符串  字符串
    console.log('search字符串', this.props.location.search)
    // const searchParmas = new URLSearchParams(this.props.location.search)
    // console.log(searchParmas.get('title'))
    // console.log(Object.fromEntries(searchParmas.entries()))
    console.log(this.props.location.search.toSearch())
    // state数据 对象且数据类型也会保留
    console.log('state数据', this.props.location.state)

    return (
      <div>
        <h3>详情页面</h3>
      </div>
    )
  }
}

export default Index
